package org.liujing.parser;

import java.util.*;
import java.util.logging.*;
import java.io.*;
import org.liujing.tools.compiler.*;
import java.util.regex.*;
import javax.swing.tree.*;
import org.liujing.jj.JavascriptParser;

import sidekick.*;

public class JsParser extends SideKickParser{
	private Logger log = Logger.getLogger(JsParser.class.getName());
	JavascriptParser parser;
	public JsParser(String name){
		super(name);
		parser = new JavascriptParser();
	}
	public SideKickParsedData parse(org.gjt.sp.jedit.Buffer buffer, errorlist.DefaultErrorSource errorSource)
	{
		try{
			return parser.parse(buffer,errorSource);
		}catch(Exception e){
			log.log(Level.WARNING,"parse failed",e);
		}
		return null;
	}
	
}
